﻿using UnityEngine;
using UnityEditor;
using System.IO;
namespace QQSDK
{
    public class IAPEditor : EditorWindow
    {
        //[MenuItem("QQSDK/IAP")]
        public static void Open()
        {
            GetWindow(typeof(IAPEditor));
        }
        public IAPEditor()
        {
            this.titleContent = new GUIContent("In App Purchase");
        }

        bool add;
        private void OnGUI()
        {
            GUILayout.BeginVertical();
            //绘制标题
            GUILayout.Space(10);
            GUI.skin.label.fontSize = 20;
            GUI.skin.label.alignment = TextAnchor.MiddleCenter;
            GUILayout.Label("In App Purchase");
            GUILayout.EndVertical();

            add = GUILayout.Button("Add");
            if (add)
            {
                AddProduct();
            }
        }
        bool open;
        void AddProduct()
        {
            GUILayout.BeginVertical();
            GUILayout.Button("商品一");
            //open = EditorGUILayout.Foldout(open, "商品一");
            GUILayout.EndVertical();

        }
    }
}